package com.example.goods.repository;

import com.example.goods.bean.ProductInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author ouyangzhixiang
 * @date 2018/7/4
 */
public interface ProductInfoRepository extends JpaRepository<ProductInfo,String> {
    /**
     *查找所有商品按价格升序排列
     * @return
     */
    List<ProductInfo> findAllByOrderByProductPriceAsc();

    /**
     * 查找所有商品按价格降序排列
     * @return
     */
    List<ProductInfo> findAllByOrderByProductPriceDesc();

}
